Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

167
Vistas
Angular 2 AOT - "Uncaught ReferenceError: exports is not defined error"

I having a problem running Angular 2 app compiled for AoT with Rollup using instructions from angular.io docs (link here)

The compilation process goes OK as far as I can tell though I'm getting this as the only output:

⚠️   'default' is imported from external module 'rollup' but never used

'initializeApp' is not exported by 'node_modules/firebase/firebase-node.js'
'initializeApp' is not exported by 'node_modules/firebase/firebase-node.js'
'app' is not exported by 'node_modules/firebase/firebase-node.js'
'auth' is not exported by 'node_modules/firebase/firebase-node.js'
'database' is not exported by 'node_modules/firebase/firebase-node.js'
'database' is not exported by 'node_modules/firebase/firebase-node.js'

The build.js is created and I have my index.html pointing to it and other required files:

<!DOCTYPE html>
<html>
<head>
    <title>Ahead of time compilation</title>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="dist/shim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.8.9/zone.min.js"></script>
</head>
<body>
    <my-app>Loading...</my-app>
</body>
<script src="dist/build.js"></script>
</html>

However, when I run my app in the browser I get Uncaught ReferenceError: exports is not defined.

Any suggestions on how to resolve it?

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda